package com.zcx.test.mapper;

import com.zcx.test.pojo.Menu;
import com.zcx.test.pojo.MenuExample;
import java.util.List;

import com.zcx.test.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface MenuMapper {
    /**
    　* @author zhaochangxin
    　* @Description:返回根菜单
    　* @return: java.util.List<com.zcx.test.pojo.Menu>
    　* @date 2022/3/10 9:44
    　* @throws
    　*/
    List<Menu> queryRootMenu();

    /**
    　* @author zhaochangxin
    　* @Description:根据父一级菜单，返回所有子菜单
    　* @Param parentId:
    　* @return: java.util.List<com.zcx.test.pojo.Menu>
    　* @date 2022/3/10 9:44
    　* @throws
    　*/
    public List<Menu> queryMenuByParentId(String parentId);

    /**
     　* @author zhaochangxin
     　* @Description:插入菜单
     　* @Param menu:
     　* @return: void
     　* @date 2022/3/10 9:43
     　* @throws
     　*/
    void insertMenu(Menu menu);

    /**
     　* @author zhaochangxin
     　* @Description:删除菜单方法 包括旗下所有的子菜单
     　* @Param id:
     　* @return: void
     　* @date 2022/3/10 10:36
     　* @throws
     　*/
    void deleteMenuById(String id);

    /**
    　* @author zhaochangxin
    　* @Description:查询该菜单下所 有的用户
    　* @Param id:
    　* @return: java.util.List<com.zcx.test.pojo.User>
    　* @date 2022/3/11 10:38
    　* @throws
    　*/
    List<User> queryUserByMenuId(String id);


    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    long countByExample(MenuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    int deleteByExample(MenuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    int insert(Menu record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    int insertSelective(Menu record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    List<Menu> selectByExample(MenuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    Menu selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    int updateByExampleSelective(@Param("record") Menu record, @Param("example") MenuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    int updateByExample(@Param("record") Menu record, @Param("example") MenuExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    int updateByPrimaryKeySelective(Menu record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table platform_menu
     *
     * @mbg.generated Mon Mar 07 09:27:25 CST 2022
     */
    int updateByPrimaryKey(Menu record);



}